<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>乐淘商城管理二级分类</title>
    <link rel="stylesheet" href="../lib/bootstrap/css/bootstrap.min.css" />
    <link
      rel="stylesheet"
      href="../lib/bootstrap-validator/css/bootstrapValidator.min.css"
    />
    <link rel="stylesheet" href="../lib/nprogress/nprogress.css" />
    <link rel="stylesheet" href="./css/common.css" />
  </head>
  <body class="pl-180">
    <div class="lt-aside bg-color1">
      <h4 class="brand">乐淘电商</h4>
      <div class="info">
        <img src="../manage/images/img1.jpg" alt="" srcset="" />
        <p>超级管理员</p>
      </div>
      <ul class="lt-nav">
        <li>
          <a href="./user.html"
            ><span class="glyphicon glyphicon-user"></span>用户管理</a
          >
        </li>
        <li>
          <a href="./product.html">
            <span class="glyphicon glyphicon-equalizer"></span>
            商品管理
          </a>
        </li>
        <li>
          <a href="#">
            <span class="glyphicon glyphicon-book"></span>
            分组管理
          </a>
          <ul class="second-nav" style="display: block">
            <li>
              <a href="./cate1.html">一级分类</a>
            </li>
            <li class="active">
              <a href="./cate2.html">二级分类</a>
            </li>
          </ul>
        </li>
      </ul>
    </div>
    <div class="lt-main">
      <div class="lt-topbar pl-180">
        <a href="#" class="menu pull-left ml-10">
          <span class="glyphicon glyphicon-align-justify"></span>
        </a>
        <a
          href="#"
          class="logout pull-right mr-10"
          data-toggle="modal"
          data-target=".model-logout"
        >
          <span class="glyphicon glyphicon-log-out"></span>
        </a>
      </div>
      <div class="lt-content">
        <ol class="breadcrumb">
          <li><a href="./index.html">管理系统</a></li>
          <li><a href="./cate.html">分组管理</a></li>
          <li><a href="./cate1.html">二级分类</a></li>
        </ol>
        <div>
          <button
            class="btn btn-default"
            data-toggle="modal"
            data-target=".modal-cate2Add"
          >
            添加分类
          </button>
          <!-- 表格 -->
          <table class="table table-bordered common-table mt-30">
            <thead>
              <th>序号</th>
              <th>一级分类名</th>
              <th>二级分类名</th>
              <th>二级分类logo</th>
            </thead>
            <tbody></tbody>
          </table>
          <!-- 分页 -->
          <div class="page-box pull-right">
            <ul id="paginator" class="pagination"></ul>
          </div>
        </div>
      </div>
    </div>
    <!-- 退出模态框 -->
    <div class="modal fade model-logout" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button
              type="button"
              class="close"
              data-dismiss="modal"
              aria-label="Close"
            ></button>
            <h4 class="modal-title">温馨提示</h4>
          </div>
          <div class="modal-body">
            <span class="glyphicon glyphicon-alert"></span>
            <span>确定要退出？</span>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">
              取消
            </button>
            <button type="button" class="btn btn-primary" id="btn-logout">
              退出
            </button>
          </div>
        </div>
        <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
    </div>
    <!-- 添加二级分类模态框 -->
    <div class="modal fade modal-cate2Add" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button
              type="button"
              class="close"
              data-dismiss="modal"
              aria-label="Close"
            ></button>
            <h4 class="modal-title">添加分类</h4>
          </div>
          <form id="sencondCateForm">
            <div class="modal-body">
              <!-- 下拉菜单 -->
              <div class="form-group">
                <input type="hidden" name="categoryId" id="topCateIdInput" />
                <div class="dropdown">
                  <button
                    class="btn btn-default dropdown-toggle btn-top-cate"
                    type="button"
                    id="dropdownMenu1"
                    data-toggle="dropdown"
                    aria-haspopup="true"
                    aria-expanded="true"
                  >
                    选择一级分类
                    <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu" id="topCateMenu"></ul>
                </div>
              </div>
              <!-- 输入框 -->
              <div class="form-group">
                <input
                  type="text"
                  name="brandName"
                  class="form-control"
                  placeholder="二级分类名称"
                />
              </div>
              <!-- 上传文件框 -->
              <div class="form-group">
                <label for="logoUploadFile" class="btn btn-default"
                  >选择图片</label
                >
                <input type="hidden" id="brandLogoInput" name="brandLogo" />
                <input
                  id="logoUploadFile"
                  style="display: none"
                  type="file"
                  data-url="/category/addSecondCategoryPic"
                  name="pic1"
                />
              </div>
              <div class="form-group">
                <img src="../images/none.png" width="100" id="preImg" />
              </div>
            </div>
            <div class="modal-footer">
              <button type="reset" class="btn btn-default">取消</button>
              <button type="submit" class="btn btn-primary" id="btn-add">
                确定
              </button>
            </div>
          </form>
        </div>
        <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
    </div>
    <script type="text/html" id="tmp_table">
      {{each rows v i}}
      <tr data-id="{{v.id}}">
        <td>{{(page-1)*size +i+1}}</td>
        <td>{{v.categoryName}}</td>
        <td>{{v.brandName}}</td>
        <td>
          <img src="../{{v.brandLogo}}" alt="" srcset="" />
        </td>
      </tr>
      {{/each}}
    </script>
    <script type="text/html" id="tmp_select">
      {{each rows v i}}
      <li><a href="#" data-id="{{v.id}}">{{v.categoryName}}</a></li>
      {{/each}}
    </script>
    <script src="../lib/artTemplate/template-web.js"></script>
    <script src="../lib/jquery/jquery.min.js"></script>
    <script src="../lib/bootstrap/js/bootstrap.min.js"></script>
    <script src="../lib/bootstrap-validator/js/bootstrapValidator.min.js"></script>
    <script src="../lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
    <script src="../lib/nprogress/nprogress.js"></script>
    <!-- 引入 jquery-fileupload 包 -->
    <script src="../lib/jquery-fileupload/jquery.ui.widget.js"></script>
    <script src="../lib/jquery-fileupload/jquery.fileupload.js"></script>
    <script src="./js/isLogin.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/vaild.js"></script>
    <script src="./js/cate2.js"></script>
  </body>
</html>
